import Taro, { Component } from '@tarojs/taro'
import { View ,} from '@tarojs/components';
import { AtButton } from 'taro-ui';
import { getDriverAdv } from '../../util/api';
import './applyOne.scss';
export default class ApplyOne extends Component {
    constructor(){
        super()
        this.state = {
            info:{},
        }
    }
    toRenzheng(){
        Taro.redirectTo({
            url:`/pages/idauthUser/idauthUser`
        })
    }
    componentWillMount(){
        getDriverAdv().then( res => {
            if(res.code == 0){
                this.setState({
                    info:res.list,
                })
            }
        })
    }
    render(){
        return(
            <View className='apply-one'>
                <View className='info-card'>
                    {/* <View className='title flex align-items flex-start'>成为代驾的基本要求如下：</View>
                    <View className='item'>1、三年安全驾龄</View>
                    <View className='item'>2、年龄23到55周岁</View>
                    <View className='item'>3、无违法记录</View>
                    <View className='item'>4、有熟练驾车经验</View>
                    <View className='item'>5、身体健康</View> */}
                    <Image className='pic' src={info.pic} />
                </View>
                <AtButton className='next-tip' type='primary' size='normal' onClick={this.toRenzheng.bind(this)}>开始认证</AtButton>
            </View>
        )
    }
}